package com.jrx.anytxn.investor.mapper.ext;

import com.jrx.anytxn.investor.entity.TlFundRouteLog;
import com.jrx.anytxn.investor.mapper.base.TlFundRouteLogMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 资金源路由记录mapper扩展
 *
 * @author liuyang
 * @date  2020-06-04
 **/
public interface ExtTlFundRouteLogMapper extends TlFundRouteLogMapper {


    /**
     * 根据路由状态查询放款资金源路由记录
     *
     * @param routeStatus 路由状态
     * @return List<TlFundRouteLog> 放款资金源路由记录
     * @author liuyang
     * @date  2020-06-04
     */
    List<TlFundRouteLog> selectFundRouteByStatusForBatch(@Param("routeStatus") List<String> routeStatus);

    /**
     * 批量插入放款资金源路由记录
     *
     * @param fundRouteLogs 放款资金源路由记录
     * @return int 插入条数
     * @author liuyang
     * @date  2020-06-05
     */
    int batchInsert(List<TlFundRouteLog> fundRouteLogs);

    /**
     * 批量更新放款资金源路由记录（用于作业批次）
     *
     * @param fundRouteLogs 放款资金源路由记录
     * @return int 更新条数
     * @author liuyang
     * @date  2020-06-11
     */
    int batchUpdateForBatch(List<TlFundRouteLog> fundRouteLogs);

    /**
     * 根据以下条件查询资金源路由信息
     * @author fan.yang
     * date: 2020/6/28 0028 上午 10:18
     * @param tenantId 租户ID
     * @param customerId 客户ID
     * @return com.jrx.anytxn.investor.entity.TlFundRouteLog
     */
    List<TlFundRouteLog> selectTlFundRouteLog(@Param("tenantId") String tenantId, @Param("customerId") String customerId);

}